package com.college.heyuhua.dao;

import com.college.heyuhua.entity.UserInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * Created by 赵东坡 on 2018/12/30.
 * Time:21:37
 * 宇宙无敌赵牛逼，祈求永无bug
 */
@Mapper
@Component
public interface RegisterMapper {

    @Insert("<script>" +
            "insert into " +
            "usersinfo (username,realname,password,age,sex,stunumber,major,stuclass,telephone,weixin) " +
            "values (#{user.username},#{user.realname},#{user.password},#{user.age},#{user.sex},#{user.stunumber},#{user.major},#{user.stuclass},#{user.telephone},#{user.weixin}) " +
            "</script>")
    boolean registry(@Param("user") UserInfo userInfo);

}
